<template>
	<!-- 车辆检测 -->
	<view>
		<view class="banner">
			<image style="width: 100%;" src="../../static/sxbm.png" mode="widthFix">
			</image>
		</view>
		<!-- <view class="page"> -->
		<view class="page" v-for="item in list">

			<view class="_flex _justify_between">
				<view class="part-title">
					{{item.reportName}}
				</view>
				<navigator
					:url="'/pagesB/carTestingDetails/carTestingDetails?detectionReportId='+item.detectionReportId">
					<view class="yl">
						报告样例<image src="../../static/cxmm.png" mode=""></image>
					</view>
				</navigator>
			</view>
			<view class="part-content" style="padding: 20rpx;">
				<view class="_flex _justify_between">
					<view>
						<view class="ItemContent">
							{{item.describes}}
						</view>
					</view>
					<view style="padding-top: 30rpx;width: 30%;text-align: right;">
						<view class="rmb">
							<u-icon name="rmb"></u-icon>{{item.price}}
						</view>
						
						
					</view>
				</view>
				<view class="_flex _justify_between">
					<view class="">
						<view style="font-size: 22rpx;margin-top: 40rpx;" class="labels">
							<text class="contentLititle" style="margin-right: 10rpx;" >
								<text>{{item.labelsList[0]}}</text>
							</text>
							<text class="contentLititle" style="margin-right: 10rpx;" >
								<text>{{item.labelsList[1]}}</text>
							</text>
						
						</view>
					</view>
					<view class="xd">
						<view class="qxd1" @click="addMoneyDx(item)">
							批量下单
						</view>
						<view class="qxd" @click="addMoney(item)">
							下单
						</view>
					</view>
				</view>
				
			</view>

		</view>
		<!-- </view> -->
	</view>
</template>

<script>
		import app from "../../App.vue"
	import API from "@/api/index.js"
	export default {
		data() {
			return {
				list: []
			}
		},
		onShow() {
			let token = uni.getStorage({
				token: token
			})
			API.detectionReportList({
				token
			}).then(res => {
				this.list = res.data
			})
		},
		methods: {
			addMoney(data) {
				console.log(data)
				app.globalData.dgxzcx = '';
				uni.navigateTo({
					url: '/pagesB/carTestingAddMoney/carTestingAddMoney?detectionReportId=' + data.detectionReportId+'&reportName='+data.reportName+'&price='+data.price+'&describes='+data.describes+'&detectionReportId='+data.detectionReportId
				});
			},
			addMoneyDx(data) {
				app.globalData.dxcx = [];
				uni.navigateTo({
					url: '/pagesB/carTestingAddMoneyDx/carTestingAddMoneyDx?detectionReportId=' + data.detectionReportId+'&reportName='+data.reportName+'&price='+data.price+'&describes='+data.describes+'&detectionReportId='+data.detectionReportId
				});
			}
		}
	}
</script>

<style scoped>
	.banner {
		height: 236rpx;
	}

	.banner image {
		height: 236rpx;
	}

	.qxd {
		width: 136rpx;
		height: 68rpx;
		line-height: 68rpx;
		background-color: #002B56;
		font-size: 28rpx;
		text-align: center;
		color: #fff;
		border-radius: 8rpx;
	}
	.qxd1{
		width: 136rpx;
		font-size: 28rpx;
		color: #002B56;
		height: 68rpx;
		line-height: 68rpx;
	}

	.part {
		background-color: #fff;
		border-radius: 10rpx;
		margin-top: 20rpx;
	}

	.part-title {
		border-left: 6rpx solid #2C2C2C;
		margin: 20rpx 0;
		font-size: 36rpx;
		font-weight: 500;
		padding-left: 14rpx;
		color: #2C2C2C;
		font-family: PingFangSC-Regular;
	}

	.part-content {
		padding: 0rpx 20rpx;
	}

	.labels {
		display: flex;
		flex-wrap: wrap;
	}

	.contentLititle {
		/* background-color: #dd616126;
		color: #DD6161; */
		background: #FFF2F1;
		border-radius: 4rpx;
		/* display: flex; */
		line-height: 39rpx;
		color: #FD7E6E;
		font-size: 24rpx;
		padding: 5rpx 10rpx;
		margin-left: 5rpx;
		margin-top: 10rpx;
	}

	.page {
		margin: 10rpx 0;
		padding: 20rpx 32rpx;
	}

	.yl {
		color: #999;
		font-size: 28rpx;
		display: flex;
		line-height: 90rpx;
		color: #2C2C2C;
	}

	.yl image {
		width: 10rpx;
		height: 10rpx;
		margin-left: 10rpx;
		margin-top: 40rpx;
	}

	.rmb {
		font-size: 38rpx;
		color: #FF552E;
		font-weight: 500;
		width: 190rpx;
	}

	.ItemContent {
		font-size: 26rpx;
	}
	.xd{
		display: flex;
		width: 300rpx;
		justify-content: space-between;
		margin-top: 40rpx;
	}
</style>
